package GUI;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

import Modelo.Casillero;
import Principal.Main;

public class VentanaMatrizR extends JFrame{
	JPanel panelR;
	int tamano;
	
	public VentanaMatrizR(){
		setTitle("Matriz R");
		setSize(500,500);
		panelR = crearGrilla();
		getContentPane().add(panelR, BorderLayout.CENTER);
		setVisible(true);
	}

	private JPanel crearGrilla() {
		JPanel panelR = new JPanel();
		tamano = PaginaPrincipal.tamano;
		panelR.setLayout(new GridLayout(tamano,tamano));
		for (int i = 0; i < tamano; i++){
			for (int j = 0; j < tamano; j++){
				String recompensa = String.valueOf (Main.matrizR[i][j]);
				JButton btnR = new JButton(recompensa);
				btnR.setBackground(Color.WHITE);
				panelR.add(btnR);
			}
		}
		return panelR;
	}
}
				
				
	

